AC_INIT([libmiko], [0.5], [onteria@live.jp], [miko])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
LT_INIT
AC_SUBST([MIKO_SO_VERSION], [3:1:0])
AC_SUBST([MIKO_API_VERSION], [0.5])

# Check for icu-config since we build cflags and ldflags from it
AC_CHECK_PROG([ICU_CONFIG], [icu-config], [icu-config])

# Check Libraries
AC_CHECK_LIB([icuuc], [main], [ICU_LDFLAGS=[`icu-config --ldflags`]], [AC_MSG_ERROR([ICU library not installed.])])

# Check Headers
AC_CHECK_HEADERS([unicode/ustring.h], [ICU_CFLAGS=[`icu-config --cflags`]])

# Set our ICU variables
AC_SUBST([ICU_LDFLAGS])
AC_SUBST([ICU_CFLAGS])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
